import 'package:get/get.dart';

// 车辆实时数据表的键
class DbTableRealtimeDataKeys {
  // 实时数据
  static const String itemList = "item_list";

  // 电池电量百分比
  static const String batteryPercent = "battery_percent";

  // 预估剩余里程
  static const String estimatedRemainingMileage = "estimated_remaining_mileage";

  // 总里程
  static const String totalMileage = "total_mileage";

  // 骑行记录
  static const String cyclingRecord = "cycling_record";

  // 所有键的列表
  static const List<String> values = [
    itemList,
    batteryPercent,
    estimatedRemainingMileage,
    totalMileage,
    cyclingRecord,
  ];

  // 通过 title 获取键
  static String? getTypeByTitle(String title) =>
      values.firstWhereOrNull((key) => key == title);
}
